package com.ruoyi.report_hntjg.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.convert.ExcelDictConvert;
import com.ruoyi.common.utils.BigDecimalUtil;
import com.ruoyi.report_tg.domain.vo.ExcelGeneralVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * 钢筋位置及保护层厚度试验检测记录视图对象 report_hntjg_gjbhcjlb_bs_info
 *
 * @author tll
 * @date 2024-08-07
 */
@Data
@ExcelIgnoreUnannotated
public class ReportHntjgGjbhcjlbBsInfoVo extends ExcelGeneralVo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long excelId;

    /**
     * 共几页
     */
    @ExcelProperty(value = "共几页")
    private Long totalPage;

    /**
     * 第几页
     */
    @ExcelProperty(value = "第几页")
    private Long page;

    /**
     * 记录编号
     */
    @ExcelProperty(value = "记录编号")
    private String jilbh;

    /**
     * 检测单位名称
     */
    @ExcelProperty(value = "检测单位名称")
    private String jiancdwmc;

    /**
     * 工程部位/用途
     */
    @ExcelProperty(value = "工程部位/用途")
    private String gongcbwyt;

    /**
     * 样品名称
     */
    @ExcelProperty(value = "样品名称")
    private String yangpmc;

    /**
     * 样品编号
     */
    @ExcelProperty(value = "样品编号")
    private String yangpbh;

    /**
     * 样品数量
     */
    @ExcelProperty(value = "样品数量")
    private String yangpsl;

    /**
     * 样品状态
     */
    @ExcelProperty(value = "样品状态")
    private String yangpzt;

    /**
     * 样品时间
     */
    @ExcelProperty(value = "样品时间")
    private String yangpsj;

    /**
     * 试验检测日期
     */
    @ExcelProperty(value = "试验检测日期")
    private String shiyjcrq;

    /**
     * 试验条件温度
     */
    @ExcelProperty(value = "试验条件温度")
    private String shiytjwd;

    /**
     * 试验条件湿度
     */
    @ExcelProperty(value = "试验条件湿度")
    private String shiytjsd;

    /**
     * 检测依据
     */
    @ExcelProperty(value = "检测依据")
    private String jiancyj;

    /**
     * 判定依据
     */
    @ExcelProperty(value = "判定依据")
    private String pandyj;

    /**
     * 主要仪器设备名称及编号
     */
    @ExcelProperty(value = "主要仪器设备名称及编号")
    private String zhuyyqsbmcjbh;

    /**
     * 附加声明
     */
    @ExcelProperty(value = "附加声明")
    private String fujsm;

    /**
     * 报表名称
     */
    @ExcelProperty(value = "报表名称")
    private String baobmc;

    /**
     * 报表编号
     */
    @ExcelProperty(value = "报表编号")
    private String baobbh;

    /**
     * 工程名称
     */
    @ExcelProperty(value = "工程名称")
    private String gongcmc;

    /**
     * 检测人
     */
    @ExcelProperty(value = "检测人")
    private String jiancr;

    /**
     * 记录人
     */
    @ExcelProperty(value = "记录人")
    private String jilr;

    /**
     * 复核人
     */
    @ExcelProperty(value = "复核人")
    private String fuhr;

    /**
     * 日期
     */
    @ExcelProperty(value = "日期")
    private Date riq;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 设备id逗号分隔
     */
    @ExcelProperty(value = "设备id逗号分隔")
    private String shebIds;

    /**
     * 检测依据ids
     */
    @ExcelProperty(value = "检测依据ids")
    private String jiancyjIds;

    /**
     * 判定依据ids
     */
    @ExcelProperty(value = "判定依据ids")
    private String pandyjIds;

    /**
     * 保护层厚度设计值（mm）
     */
    @ExcelProperty(value = "保护层厚度设计值", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "m=m")
    private BigDecimal baohcSjz;

    /**
     * 钢筋间距设计值（mm）
     */
    @ExcelProperty(value = "钢筋间距设计值", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "m=m")
    private BigDecimal gangjSjz;

    @ExcelProperty(value = "保护层允许偏差", converter = ExcelDictConvert.class)
    private BigDecimal baohcYxpc;

    @ExcelProperty(value = "钢筋间距允许偏差", converter = ExcelDictConvert.class)
    private BigDecimal gangjYxpc;

    @ExcelProperty(value = "子表")
    private List<ReportHntjgGjbhcjlbBaDetailVo> detailList;
    private List<ReportHntjgGjbhcjlbBaDetailVo> baohcList;
    private List<ReportHntjgGjbhcjlbBaDetailVo> gangjList;

    @ExcelProperty(value = "报表编号集")
    private List<String> baobbhList;

    public void setBaohcSjz(BigDecimal baohcSjz) {
        this.baohcSjz = BigDecimalUtil.stpTrailZero(baohcSjz);
    }

    public void setGangjSjz(BigDecimal gangjSjz) {
        this.gangjSjz = BigDecimalUtil.stpTrailZero(gangjSjz);
    }

    public void setBaohcYxpc(BigDecimal baohcYxpc) {
        this.baohcYxpc = BigDecimalUtil.stpTrailZero(baohcYxpc);
    }

    public void setGangjYxpc(BigDecimal gangjYxpc) {
        this.gangjYxpc = BigDecimalUtil.stpTrailZero(gangjYxpc);
    }

    /**
     * 墩柱/台身号
     */
    private String dunztsh;
    /**
     * 测点起点位置
     */
    private String cedqdwz;
    /**
     * 测点详情
     */
    private String cedDetailStr;
    /**
     * 合格率
     */
    private String hegl;

    /**
     * 测试保护层均值
     */
    private Double cesbhcjz;
    private Double cesbhcMax;
    private Double cesbhcMin;
    /**
     * 详细表
     */
    private List<ReportHntjgGjbhcjlbBaDetailVo> baDetailVos;

    public ReportHntjgGjbhcjlbBsInfoVo() {
        baDetailVos = new ArrayList<>(70);
        for (long i = 1; i <= 70L; i++) {
            baDetailVos.add(new ReportHntjgGjbhcjlbBaDetailVo(1111L, i));
        }
    }
}
